﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
       static void Main(string[] args){
        
        Random rnd = new Random();
        Interface i = new ToolsetForArrayOfInteger();     
        for(int k=0; k<100; k++){
  
        int has = rnd.Next(-10, 10) ;
        int[] a = i.InitRandom(10);
             Console.WriteLine("Ist bereits sortiert? => "+i.sorted(a));
        i.sort(ref a);
        String s = "Array Sortiert: [";
        for(int j = 0; j< a.Length; j++){
            s += a[j] + ", ";
        }
        s+="] ";
        Console.WriteLine(s);
        Console.WriteLine("Existiert in dem array "+has+"? =>"+i.has(a, has)+"\n");
 } 
        Console.ReadKey();

    }

         
        
    }
}
